package com.itheima.d6_singleInstance;

/*
    目标：掌握懒汉式单例的写法。
    懒汉式
 */
public class Test2 {
    public static void main(String[] args) {
        Teacher teacher=Teacher.getTeacher();
        //Student stu1=Student.getStudent1();
        Teacher teacher1=Teacher.getTeacher();
        System.out.println(teacher.toString()+"\n"+teacher1);
    }
}
